<?php
/* (c)2010 by Steffen B.
*   All rights reserved!
*   math.php
*/
 function mulbrueche($z1,$n1,$z2,$n2)
  {
   $z = $z1 * $z2;
   $n = $n1 * $n2;
   return $z."<br>----<br>".$n;
  }
  function teilermenge($v,$b)
    {
     for($z = $v;$z <= $b;$z++)
       {
        $r .= $z.": ";
          for($t = 1;$t <= ($z / 2);$t++)
            {
             if(($z % $t) == 0)
               {
                 $r .= $t." ";
               }
            }
          $r .= $z." "; //FIX
          $r .= "<br>";
       }
      return $r;
    }
 function primes($v,$b)
   {
    for($z = $v;$z <= $b;$z++)
      {
       $prime = true;
        for($t = 2;$t <= ($z / 2);$t++)
          {
           if(($z % $t) == 0)
             {
              $prime = false; break;
             }
          }
        if($prime == true)
          {
           $p .= $z."<br>";
          }
      }
    return $p;
   }